package com.xungou.receiver.service.impl;

import com.xungou.core.mvc.AbstractService;
import com.xungou.core.mvc.IDao;
import com.xungou.receiver.dao.IReceiver;
import com.xungou.receiver.pojo.Receiver;
import com.xungou.receiver.service.IReceiverService;
import com.xungou.utils.UserUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Service("receiverService")
public class ReceiverServiceImpl extends AbstractService<Receiver> implements IReceiverService {
    @Resource  
    private IReceiver iReceiver;

    @Override
    protected IDao<Receiver> getDao() {
        return iReceiver;
    }

    @Override
    public List<Receiver> list(Map<String, Object> params) {
        params.put("userId", UserUtil.getCurrentUser().getId());
        return iReceiver.list(params);
    }
}